package com.sf.fy.uav.order.rest;

import com.sf.fy.uav.common.request.order.UpdateStatusRequest;
import com.sf.fy.uav.common.utils.Rs;
import com.sf.fy.uav.order.service.IOrderInfoService;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author LTQ
 * @since 2023-01-02
 */
@RestController
public class OrderRest {

    @Autowired
    private IOrderInfoService iOrderInfoService;

    @GetMapping("/payment/hystrix/ok/id")
    public String paymentInfo_ok(@RequestParam(value = "XXCode", required = false) String XXCode) {
        System.out.println("");
        return "您好";
    }

    ;

    @GetMapping("/list")
    public void list() {
    }


    @Operation(tags = "修改订单状态", description = "修改订单状态")
    public Rs<Void> updateStatus(@RequestBody UpdateStatusRequest updateStatusRequest) {
        iOrderInfoService.updateStatus(updateStatusRequest);
        return Rs.success();
    }
}
